package com.ruoyi.system.api.factory;


import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.RemoteTeachService;
import com.ruoyi.system.api.domain.Student;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RemoteTeachFallbackFactory implements FallbackFactory<RemoteTeachService> {


    @Override
    public RemoteTeachService create(Throwable cause) {
        return new RemoteTeachService() {
            @Override
            public R remoteInsert(Student student) {
                return R.fail("远程服务调用异常");
            }
        };
    }
}
